import uuid

#验证账号密码格式
def validation_pa(account,password):
    #账户名是大于6位的字母和数字
    if len(account)<6:
        result = {'result':False,'msg':"账户名小于6位"}
        return result
    elif not account.isalnum():
        result = {'result':False,'msg':"账户名组合类型错误"}
        return result
    elif len(password)<6:
        result = {'result':False,'msg':"密码小于6位"}
        return result
    else:
        result = {'result':True,'msg':"正确"}
        return result
#生成用户id
def getuserid():
    uid = str(uuid.uuid1())
    uid = uid[1:5]+uid[9:13]
    return uid
def getimgid():
    uid = str(uuid.uuid1())
    uid.replace("-","")
    return uid